#!/usr/bin/make -f
ARCH=$(shell /bin/uname -m)

ifeq ($(ARCH),$(filter $(ARCH),powerpc mips mipsel))
CC=/usr/bin/clang
CXX=/usr/bin/clang++
else
CC=/usr/bin/gcc
CXX=/usr/bin/g++
endif

all:
	echo ${CXX}

%:
	dh $@ --buildsystem=cmake --with python2
#dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --with python2,python3

override_dh_auto_configure:
	ln -s /usr/include/shogun shogun
	dh_auto_configure -- -DENABLE_CCACHE=FALSE -DCMAKE_SKIP_RPATH=TRUE \
		-DBUILD_EXAMPLES=OFF -DUSE_SVMLIGHT=OFF -DPythonStatic=ON -DPythonModular=ON \
		-DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX)

override_dh_install:
	$(MAKE) -C doc examples
	dh_install
	dh_numpy

override_dh_strip:
	dh_strip --dbg-package=python-shogun-dbg
